package com.angel.socket;

import com.angel.bean.Employee;
import com.angel.bean.dto.SocketEmployeeDto;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * 存储在线用户的资料
 *
 * @author Rabit
 */
public class WebSocketUsers {
    public static Map<String, SocketEmployeeDto> eMap = null;
    static{
        eMap = Collections.synchronizedMap(new HashMap<String,SocketEmployeeDto>());
    }

    public static Map<String, SocketEmployeeDto> getEmap(){
        return WebSocketUsers.eMap;
    }

    public static void putEmployee(String sessionId,SocketEmployeeDto employeeDto){
        WebSocketUsers.eMap.put(sessionId,employeeDto);
    }

}
